#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include <stdio.h>

int main() {
    int sideLength = 5; 
    int height = 2 * sideLength - 1; 
    int width = 2 * sideLength - 1; 
    char hexagon[height][width]; 
    for (int i = 0; i < height; i++) {
        for (int j = 0; j < width; j++) {
            hexagon[i][j] = ' ';
        }
    }
    for (int i = 0; i < sideLength; i++) {
        hexagon[i][sideLength - i - 1] = '*';
        hexagon[i][sideLength + i - 1] = '*';
        hexagon[height - i - 1][sideLength - i - 1] = '*';
        hexagon[height - i - 1][sideLength + i - 1] = '*';
    }
    for (int i = sideLength; i < height - sideLength; i++) {
        hexagon[i][0] = '*';
        hexagon[i][width - 1] = '*';
    }
    for (int i = 0; i < height; i++) {
        for (int j = 0; j < width; j++) {
            printf("%c", hexagon[i][j]);
        }
        printf("\n");
    }

    return 0;
}